//
//  CustomerAVPlayerView.h
//  网络视频播放多段缓存
//
//  Created by apple on 16/5/26.
//  Copyright © 2016年 cheniue. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <AVFoundation/AVFoundation.h>
#import "CustomerControlView.h"
#import "VideoResourceSupport.h"
@protocol CustomerDelegate <NSObject>
@optional
- (void)clickBackBtnVideoPlay;
- (void)videoIsStartToPlay;

@end

@interface CustomerAVPlayerView : UIView
@property (nonatomic, weak) id<CustomerDelegate> Delegate;

@property(nonatomic,strong,readonly)UIView *playView;

@property(nonatomic,strong)CustomerControlView *controlView;

@property(nonatomic,strong,readonly)AVPlayer *player;

@property(nonatomic,strong,readonly)AVPlayerLayer *playLayer;

@property(nonatomic,strong)AVPlayerItem *playItem;

@property(nonatomic,assign)BOOL showControl;

//是否循环播放  默认否
@property(nonatomic,assign)BOOL isCycleplay;

//是否静音  默认否
@property(nonatomic,assign)BOOL isMute;
//是否显示控制器
@property(nonatomic,assign)BOOL isShowControl;


@property(nonatomic,strong,readonly)VideoResourceSupport *delegate;

@property(nonatomic,assign,readonly)BOOL isFullScreen;
@property(nonatomic,assign)CGRect smallRect;

-(instancetype)initWithFrame:(CGRect)frame urlPath:(NSString*)urlPath isFileUrl:(BOOL)isFileUrl;

-(instancetype)initWithFrame:(CGRect)frame urlPath:(NSString *)urlPath isFileUrl:(BOOL)isFileUrl isCycleplay:(BOOL)isCycleplay isMute:(BOOL)isMute isShowControl:(BOOL)isShowControl;

-(void)dissmissControlView;
@end
